<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    237. Delete Node in a Linked List
   </h1>
   <p>
    Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.
   </p>
   <p>
    Given linked list --&nbsp;head =&nbsp;[4,5,1,9], which looks like following:
   </p>
   <p>
    <img alt="" src="https://assets.leetcode.com/uploads/2018/12/28/237_example.png" style="margin-top: 5px; margin-bottom: 5px; width: 300px; height: 49px;">
   </p>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> head = [4,5,1,9], node = 5
<strong>Output:</strong> [4,1,9]
<strong>Explanation: </strong>You are given the second node with value 5, the linked list should become 4 -&gt; 1 -&gt; 9 after calling your function.
</pre>
   <p>
    <strong>
     Example 2:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> head = [4,5,1,9], node = 1
<strong>Output:</strong> [4,5,9]
<strong>Explanation: </strong>You are given the third node with value 1, the linked list should become 4 -&gt; 5 -&gt; 9 after calling your function.
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     Note:
    </strong>
   </p>
   <ul>
    <li>
     The linked list will have at least two elements.
    </li>
    <li>
     All of the nodes' values will be unique.
    </li>
    <li>
     The given node&nbsp;will not be the tail and it will always be a valid node of the linked list.
    </li>
    <li>
     Do not return anything from your function.
    </li>
   </ul>
  </div>
  <div>
   <h1 class="question_title">
    237. 删除链表中的节点
   </h1>
   <p>
    请编写一个函数，使其可以删除某个链表中给定的（非末尾）节点，你将只被给定要求被删除的节点。
   </p>
   <p>
    现有一个链表 --&nbsp;head =&nbsp;[4,5,1,9]，它可以表示为:
   </p>
   <p>
    <img alt="" src="https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2019/01/19/237_example.png" style="height: 49px; width: 300px;">
   </p>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     示例 1:
    </strong>
   </p>
   <pre><strong>输入:</strong> head = [4,5,1,9], node = 5
<strong>输出:</strong> [4,1,9]
<strong>解释: </strong>给定你链表中值为&nbsp;5&nbsp;的第二个节点，那么在调用了你的函数之后，该链表应变为 4 -&gt; 1 -&gt; 9.
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre><strong>输入:</strong> head = [4,5,1,9], node = 1
<strong>输出:</strong> [4,5,9]
<strong>解释: </strong>给定你链表中值为&nbsp;1&nbsp;的第三个节点，那么在调用了你的函数之后，该链表应变为 4 -&gt; 5 -&gt; 9.
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     说明:
    </strong>
   </p>
   <ul>
    <li>
     链表至少包含两个节点。
    </li>
    <li>
     链表中所有节点的值都是唯一的。
    </li>
    <li>
     给定的节点为非末尾节点并且一定是链表中的一个有效节点。
    </li>
    <li>
     不要从你的函数中返回任何结果。
    </li>
   </ul>
  </div>
 </body>
</html>